import request from '@/utils/request'
import { subUrl } from '@/api/dev'
const tempUrl = `${subUrl}/device`

//设备列表
export function getAllDevice(data) {
  return request({
    url: `${tempUrl}/getAllDeviceByCustNumber`,
    method: 'post',
    data,
  })
}
//设备汇总数据

export function getTotalDeviceData(data) {
  return request({
    url: `${tempUrl}/getTotalDeviceData`,
    method: 'post',
    data,
  })
}

//初始化
export function creatDev(data) {
  return request({
    url: `${tempUrl}/createDeviceList`,
    method: 'post',
    data,
  })
}

export function getProductByDevice(data) {
  return request({
    url: `${tempUrl}/getProductByDevice`,
    method: 'post',
    data,
  })
}

export const alarmUploadUrl = `${tempUrl}/alarmUpload`
export const productUploadUrl = `${tempUrl}/productUpload`
